<script>
    let url
    let status

    function fet() {
        fetch("/api/call").then((r)=>{
            console.log(r)
            url=r.url
            status=r.status
        })
    }
</script>

<main>
    <h1>{url}</h1>
    <h1>{status}</h1>
    <button on:click={fet}>Call Api</button>
</main>